﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;

namespace TMV.Repositories
{
    public interface IApplicationRepository<T> where T : class
    {
        IEnumerable<T> Get(
            Expression<Func<T, bool>> filter = null,
            Func<IQueryable<T>, IOrderedQueryable<T>> orderBy = null,
            string includeProperties = "");

        T GetById(object id);
        T Insert(T entity);
        IEnumerable<T> Insert(IEnumerable<T> entities);
        void Update(T entity);
        void Delete(T entity);
        void Delete(object id);
    }
}
